package pers.xuyong.code.override;

import java.io.Serializable;

/**
 * 重写,动态分派
 *
 * @author billymac
 * @version 1.0
 * @date 17/10/11  下午2:45
 * @since JDK1.8
 */
public class Override {

//    public static void display(char tmp) {
//        System.out.println("Char is " + tmp);
//    }
//
//    public static void display(int tmp) {
//        System.out.println("Int is " + tmp);
//    }
//    public static void display(Character tmp) {
//        System.out.println("Character is " + tmp);
//    }

//    public static void display(long tmp) {
//        System.out.println("Long is " + tmp);
//    }

//    public static void display(Serializable tmp) {
//        System.out.println("Serializable is " + tmp);
//    }

//    public static void display(Comparable<Character> tmp) {
//        System.out.println("Comparable is " + tmp);
//    }

    public static void display(Object tmp) {
        System.out.println("Object is " + tmp);
    }

    public static void main(String[] args) {
        Override.display('a');
    }
}
